SERVER=$(shell awk '/SERVER *=/ { split($$0,arr,"="); gsub(" ","",arr[2]); print arr[2]; }' server.cnfg)
SERVER_DEBUG=$(SERVER)_debug

.PHONY : default all debug release clean

default : debug

all : debug release

debug :
	$(MAKE) -C svr debug
	cp svr/$(SERVER_DEBUG) .

release :
	$(MAKE) -C svr release
	cp svr/$(SERVER) .

clean :
	$(MAKE) -C svr clean
	rm -fr _log
	rm -f core* $(SERVER) $(SERVER_DEBUG)
